function poly_coeffs = fit_k_matrix_big()
    %生成L和R的值
    L_values = 0.14:0.01:0.40;
    R_values = 0.14:0.01:0.40;

    %计算组合数量
    num_L = length(L_values);
    num_R = length(R_values);
    num_samples = num_R * num_L;

    %初始化K矩阵数组
    K_matices = zeros(4,10,num_samples);

    %对每个L和R的组合生成K矩阵数据
    sample_index =  1;
    for i = 1:num_L
        for j = 1:num_R
             L=L_values(i);
            R=R_values(j);
            K_matices(:,:,sample_index)= LQR_AB_K(L,R);
            sample_index = sample_index +1;
        end
    end
    %初始化多项式系数数组
    poly_coeffs = zeros(4,10,6);%每个元素都有6个系数

    %对每个元素进行多项式拟合
    for i = 1:4
        for j=1:10
            %提取当前元素的所有样本值
            Y=squeeze(K_matices(i,j,:));

            %构建设计矩阵
            [L_grid,R_gird] = meshgrid(L_values,R_values);
            L_grid = L_grid(:);
            R_gird = R_gird(:);
            X = [L_grid.^2,L_grid.*R_gird,R_gird.^2,L_grid,R_gird,ones(num_samples,1)];

            %最小二乘法拟合多项式
            coeffs = X \ Y;
            %保持系数
            poly_coeffs(i,j,:) = coeffs;
        end
    end

    return 
end

